﻿<%@ WebService Language="C#" Class="wx_ws" %>

using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Collections.Generic;

[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
//若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务，请取消对下行的注释。 
[System.Web.Script.Services.ScriptService]
public class wx_ws  : System.Web.Services.WebService {
    /// <summary>
    /// 获取登录的用户名和密码是否存在。
    /// </summary>
    /// <param name="username"></param>
    /// <param name="pwd"></param>
    /// <returns>存在返回true,不存在返回false</returns>
    [WebMethod]
    public bool GetUser(string username,string pwd)
    {
        TB.BLL.MpUserInfo userBll = new TB.BLL.MpUserInfo();
        return userBll.IsExist(username, pwd);
    }

    [WebMethod]
    public System.Data.DataSet GetUserDs(string strSql)
    {
        TB.BLL.MpUserInfo usrBll = new TB.BLL.MpUserInfo();
        return usrBll.GetDataSet(strSql);
    }
    
    [WebMethod]
    public System.Data.DataSet GetMpRespMsg()
    {
        System.Data.DataSet DS = new System.Data.DataSet();
        TB.BLL.MpRespMsg respMsg = new TB.BLL.MpRespMsg();
        DS=respMsg.GetRespMsgDT();
        return DS;
    }

    [WebMethod]
    public int InsertNode(TB.Entity.MpRespMsg respMsgEntity)
    {
        TB.BLL.MpRespMsg respMsgBll = new TB.BLL.MpRespMsg();
        return respMsgBll.InsertRespMsg(respMsgEntity);
    }

    [WebMethod]
    public int DeleteNode(int auto_id)
    {
        TB.BLL.MpRespMsg respMsgBll = new TB.BLL.MpRespMsg();
        return respMsgBll.DeleteRespMsg(auto_id);
    }

    [WebMethod]
    public int UpdateNode(string colName,string value,int id_auto)
    {
        TB.BLL.MpRespMsg respBll = new TB.BLL.MpRespMsg();
        return respBll.UpdateColValue(colName, value, id_auto);
    }

    [WebMethod]
    public int Update(TB.Entity.MpRespMsg respEntity)
    {
        TB.BLL.MpRespMsg respBll = new TB.BLL.MpRespMsg();
        return respBll.UpdateRespMsg(respEntity);
    }

    [WebMethod]
    public int UpdateMpUser(TB.Entity.MpUserInfo userEntity)
    {
        TB.BLL.MpUserInfo userBll = new TB.BLL.MpUserInfo();
        return userBll.Update(userEntity);
    }

    [WebMethod]
    public int GetIdAuto(string keyword,out string createTime)
    {
        TB.BLL.MpRespMsg respBll = new TB.BLL.MpRespMsg();
        return respBll.GetIdAuto(keyword, out createTime);
        //return 0;        //;
    }
    
}